package demo2;

import java.io.DataOutputStream;
import java.io.FileOutputStream;

public class TestWritable {
    public static void main(String[] args) throws Exception{
        // hadoop序列化
        Teacher teacher = new Teacher("余生",88);
        DataOutputStream dos = new DataOutputStream(new FileOutputStream("D:\\teacher"));
        teacher.write(dos);
        dos.close();
    }
}
